package com.spic.business.getui.controller;

import com.spic.business.getui.dto.PushUniDoing;
import com.spic.business.getui.dto.PushVo;
import com.spic.business.getui.service.PushService;
import com.spic.common.core.web.domain.AjaxResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 个推推送消息
 * @Author: wzl
 * @Date: 2022-03-21 15:31
 */
@RestController
@RequestMapping("/app/getui")
public class PushController {

    @Autowired
    private PushService doPush;

    @PostMapping("/push")
    public AjaxResult pushUni(@RequestBody PushVo pushVo){
        Map<String, Object> push = doPush.push(pushVo.getCid(), pushVo.getTitle(), pushVo.getContent(), pushVo.getClientType());
        return  AjaxResult.success(push);
    }
}
